/**
 * 路由规则
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
import Secondcomponent from './component/secondcomponent.vue'
import Page1 from './components/page1/Page1.vue';
import Page2 from './components/page2/Page2.vue';
import Page3 from './components/page3/Page3.vue';


Vue.use(VueRouter);
const routes = [
    {
      path: '/secondcomponent',
      component:require('./component/secondcomponent')
    }, {
        path: '/page1',
        component: Page1,
      }, {
        path: '/page2',
        component: Page2,
      }, {
        path: '/page3',
        component: require('./component/secondcomponent'),
      }, {
        path: '/table',
        component: require('./views/table'),
      }, {
        path: '/form',
        component: require('./views/form'),
      }, {
        path: '/select',
        component: require('./views/select'),
      }
];

const router = new VueRouter({
    routes:routes,
    history:true,
    linkActiveClass:'active', //如果有底部导航栏，这个属性可以为被选中的路由增加相应的选中状态class
});

router.beforeEach((to, from, next) => {
  next();
});




export default router;